<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<!--[if IE ]>
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<![endif]-->
		<meta charset="utf-8">
		<title>ThinkCMF</title>
		<meta name="description" content="This is page-header (.page-header &gt; h1)">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<link href="__STATIC__/Admin/reset.css?{$js_debug}" rel="stylesheet">
		<link href="__STATIC__/Admin/bootstrap.min.css?{$js_debug}" rel="stylesheet">
		<link href="__STATIC__/Admin/bootstrap-responsive.min.css?{$js_debug}" rel="stylesheet">
		<link rel="stylesheet" href="__STATIC__/Admin/css/font-awesome.min.css?{$js_debug}">
		<!--[if IE ]>
				  <link rel="stylesheet" href="__STATIC__/Admin/css/font-awesome-ie7.min.css?{$js_debug}" />
		<![endif]-->
		<link rel="stylesheet" href="__STATIC__/Admin/prettify.css?{$js_debug}">
		<link rel="stylesheet" href="__STATIC__/Admin/css">
		<link rel="stylesheet" href="__STATIC__/Admin/ace.min.css?{$js_debug}">
		<link rel="stylesheet" href="__STATIC__/Admin/ace-responsive.min.css?{$js_debug}">
		<link rel="stylesheet" href="__STATIC__/Admin/ace-skins.min.css?{$js_debug}">
		<!--[if lte IE 8]>
		<link rel="stylesheet" href="__STATIC__/Admin/ace-ie.min.css?{$js_debug}" />
		<![endif]-->
		<link rel="stylesheet" href="__STATIC__/Admin/style_new.css?{$js_debug}">
		<link rel="stylesheet" href="__STATIC__/Admin/theme_blue.css?{$js_debug}">
		<link rel="stylesheet" href="__STATIC__/Admin/hack.css?{$js_debug}">
		<script>
			//全局变量
			var GV = {
				HOST: "{$_SERVER['HTTP_HOST']}",
				DIMAUB: "__ROOT__/",
				JS_ROOT: "static/js/",
				TOKEN: ""
			};
		</script>
	<php>$submenus=(array)json_decode($SUBMENU_CONFIG);</php>
	<php>function getsubmenu($submenus){</php>
	<php>foreach($submenus as $menu){ </php>
	<li>
	<php>if(empty($menu->items)){</php>
	<a href="javascript:openapp('{$menu:url}','{$menu:id}','{$menu:name}');">
		<i class="fa fa-{$menu:icon|default='desktop'}"></i>
		<span class="menu-text">{$menu:name}</span>
	</a>
	<php>}else{</php>
	<a href="#" class="dropdown-toggle">
		<i class="fa fa-{$menu:icon|default='desktop'}"></i>
		<span class="menu-text">{$menu:name}</span>
		<b class="arrow fa fa-angle-down"></b>
	</a>
	<ul  class="submenu">
		<php>getsubmenu1((array)$menu->items)</php>
	</ul>	
	<php>}</php>

</li>

<php>}</php>
<php>}</php>

<php>function getsubmenu1($submenus){</php>
<php>foreach($submenus as $menu){</php>
<li>
<php>if(empty($menu->items)){</php>
<a href="javascript:openapp('{$menu:url}','{$menu:id}','{$menu:name}');">
	<i class="fa fa-angle-double-right"></i>
	<span class="menu-text">{$menu:name}</span>
</a>
<php>}else{</php>
<a href="#" class="dropdown-toggle">
	<i class="fa fa-angle-double-right"></i>
	<span class="menu-text">{$menu:name}</span>
	<b class="arrow fa fa-angle-down"></b>
</a>
<ul  class="submenu">
	<php>getsubmenu2((array)$menu->items)</php>
</ul>	
<php>}</php>

</li>

<php>}</php>
<php>}</php>

<php>function getsubmenu2($submenus){</php>
<php>foreach($submenus as $menu){</php>
<li>
	<a href="javascript:openapp('{$menu:url}','{$menu:id}','{$menu:name}');">
		<i class="fa fa-leaf"></i>
		<span class="menu-text">{$menu:name}</span>
	</a>
</li>
<php>}</php>
<php>}</php>


<if condition="APP_DEBUG">
	<style>
		#think_page_trace_open{left: 0 !important;right: initial !important;}			
	</style>
</if>
</head>

<body style="" screen_capture_injected="true">
	<div id="loading"><i class="loadingicon"></i><span>正在加载...</span></div>
	<div id="right_tools_wrapper">
		<!--<span id="right_tools_clearcache" title="清除缓存" onclick="javascript:openapp('{:u(\'admin/setting/clearcache\')}', 'right_tool_clearcache', '清除缓存');"><i class="fa fa-trash-o right_tool_icon"></i></span>-->
		<span id="refresh_wrapper" title="刷新当前页" ><i class="fa fa-refresh right_tool_icon"></i></span>
	</div>
	<div class="navbar">
		<div class="navbar-inner">
			<div class="container-fluid">
				<a href="{:U('admin/index'/index)}" class="brand"> <small> 
						<img src="__STATIC__/images/icon/logo-18.png">
						ThinkCMF 后台
					</small>
				</a>
				<ul class="nav ace-nav pull-right">
					<li class="light-blue">
						<a data-toggle="dropdown" href="#" class="dropdown-toggle">
							<img class="nav-user-photo" src="__STATIC__/Admin/user.jpg" alt="{$admin.user_login}">
							<span class="user-info">
								<small>欢迎,</small>{$admin.user_nicename|default=$admin[user_login]}
							</span>
							<i class="fa fa-caret-down"></i>
						</a>
						<ul class="user-menu pull-right dropdown-menu dropdown-yellow dropdown-caret dropdown-closer">
							<li><a href="javascript:openapp('{:u('setting/site')}','index_site','站点管理');"><i class="fa fa-cog"></i>站点管理</a></li>
							<li><a href="javascript:openapp('{:u('user/userinfo')}','index_userinfo','个人资料');"><i class="fa fa-user"></i>个人资料</a></li>
							<li class="divider"></li>
							<li><a href="{:U('Public/logout')}"><i class="fa fa-off"></i>退出</a></li>
						</ul>
					</li>
				</ul>
			</div>
		</div>
	</div>

	<div class="main-container container-fluid">
		<a class="menu-toggler" id="menu-toggler"
		   href="#">
			<span class="menu-text"></span>
		</a>
		<div class="sidebar" id="sidebar">
			<div class="sidebar-shortcuts" id="sidebar-shortcuts">
				<div class="sidebar-shortcuts-large" id="sidebar-shortcuts-large">
					<a class="btn btn-small btn-success" href="javascript:openapp('{:u('term/index')}','index_termlist','分类管理');" title="分类管理">
						<i class="fa fa-th"></i>
					</a>
					<a class="btn btn-small btn-info" href="javascript:openapp('{:u('post/index')}','index_postlist','文章管理');" title="文章管理">
						<i class="fa fa-pencil"></i>
					</a>
					<a class="btn btn-small btn-warning" href="__ROOT__/" title="前台首页" target="_blank">
						<i class="fa fa-home"></i>
					</a>
					<a class="btn btn-small btn-danger" href="javascript:openapp('{:u('admin/setting/clearcache')}','index_clearcache','清除缓存');" title="清除缓存">
						<i class="fa fa-trash-o"></i>
					</a>
				</div>
				<div class="sidebar-shortcuts-mini" id="sidebar-shortcuts-mini">
					<span class="btn btn-success"></span> <span class="btn btn-info"></span>

					<span class="btn btn-warning"></span> <span class="btn btn-danger"></span>
				</div>
			</div>
			<div class="sidebar-collapse" id="sidebar-collapse">
				<i class="fa fa-angle-double-left"></i>
			</div>
			<div id="nav_wraper">
				<ul class="nav nav-list">
					{:getsubmenu($submenus)}
				</ul>
			</div>
		</div>
		<div class="main-content">
			<div class="breadcrumbs" id="breadcrumbs">
				<a id="task-pre" class="task-changebt">←</a>
				<div id="task-content">
					<ul class="macro-component-tab" id="task-content-inner">
						<li class="macro-component-tabitem noclose" app-id="0" app-url="{:u('main/index')}" app-name="首页">
							<span class="macro-tabs-item-text">首页</span>
						</li>
					</ul>
					<div style="clear:both;"></div>
				</div>
				<a id="task-next" class="task-changebt">→</a>
			</div>
			<div class="page-content" id="content">
				<iframe src="{:U('Main/index')}" style="width:100%;height: 100%;" frameborder="0" id="appiframe-0" class="appiframe"></iframe>
			</div>
		</div>
	</div>
	<script src="__STATIC__/Admin/jquery-1.7.2.min.js?{$js_debug}"></script>
	<script type="text/javascript">
			if ("ontouchend" in document) {
				document.write("<script src='__STATIC__/Admin/jquery.mobile.custom.min.js'>" + "<" + "/script>");
			}
	</script>
	<script src="__STATIC__/Admin/bootstrap.min.js?{$js_debug}"></script>
	<script src="__STATIC__/Admin/prettify.js?{$js_debug}"></script>
	<script src="__STATIC__/Admin/ace-elements.min.js?{$js_debug}"></script>
	<script src="__STATIC__/Admin/ace.min.js?{$js_debug}"></script>
	<script src="__STATIC__/Admin/jquery.nicescroll.js?{$js_debug}"></script>
	<script src="__STATIC__/Admin/script.js?{$js_debug}"></script>
	<script src="__STATIC__/Admin/index.js?{$js_debug}"></script>
	<script type="text/javascript">
			$(function() {
				window.prettyPrint && prettyPrint();
				$('#id-check-horizontal').removeAttr('checked').on('click', function() {
					$('#dt-list-1').toggleClass('dl-horizontal').prev().html(this.checked ? '&lt;dl class="dl-horizontal"&gt;' : '&lt;dl&gt;');
				});
			});
	</script>
</body>
</html>